package com.study.modules.sys.model.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.study.common.validate.Update;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.*;
import java.util.Date;

/**
 * @Author Mr.Du
 * @Date 2021/10/16 8:51
 */
@Data
@TableName("sys_user")
public class SysUser {
    @Valid
    @NotNull(message = "用户id为空",groups = Update.class)
    @NotBlank(message = "用户id为空",groups = Update.class)
    private Long id;
    @Valid
    @NotBlank(message = "用户名不能为空！")
    private String loginName;
    @Valid
    @Size(message = "密码必须大于4位，小于10位！",max = 10 , min = 4)
    @NotBlank(message = "密码不能为空！")
    private String password;
    private String salt;
    @Valid
    @NotBlank(message = "名字不能为空！")
    private String realName;
    private Integer userType;
    private Integer status;
    private Integer deleted;
    private Long createId;
    private Date createTime;
    private Long updateId;
    private Date updateTime;
}
